home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / LFOSpecifier.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  2.4 KB  |  93 lines  |  [TEXT/KAHL]

  1. /* LFOSpecifier.h */
  2.  
  3. #ifndef Included_LFOSpecifier_h
  4. #define Included_LFOSpecifier_h
  5.  
  6. /* LFOSpecifier module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* Envelope */
  13. /* SampleSelector */
  14.  
  15. /* forward declarations */
  16. struct EnvelopeRec;
  17. struct SampleSelectorRec;
  18.  
  19. /* what kind of oscillator is the LFO */
  20. typedef enum
  21.     {
  22.         eLFOConstant1 EXECUTE(= -12492),
  23.         eLFOSignedSine,
  24.         eLFOPositiveSine,
  25.         eLFOSignedTriangle,
  26.         eLFOPositiveTriangle,
  27.         eLFOSignedSquare,
  28.         eLFOPositiveSquare,
  29.         eLFOSignedRamp,
  30.         eLFOPositiveRamp,
  31.         eLFOSignedLinearFuzz,
  32.         eLFOPositiveLinearFuzz,
  33.         eLFOWaveTable
  34.     } LFOOscTypes;
  35.  
  36. /* ways the LFO can be used to modulate the signal */
  37. typedef enum
  38.     {
  39.         eLFOAdditive EXECUTE(= -942),
  40.         eLFOMultiplicative,
  41.         eLFOInverseMultiplicative
  42.     } LFOModulationTypes;
  43.  
  44. /* this is the algorithm that will be used to combine the signal & modulator */
  45. typedef enum
  46.     {
  47.         eLFOArithmetic EXECUTE(= -12481), /* add signals */
  48.         eLFOGeometric /* add base-2 logs of signals & exp */
  49.     } LFOAdderMode;
  50.  
  51. struct LFOSpecRec;
  52. typedef struct LFOSpecRec LFOSpecRec;
  53.  
  54. /* create a new LFO specification record */
  55. LFOSpecRec*                        NewLFOSpecifier(void);
  56.  
  57. /* dispose an LFO specification */
  58. void                                    DisposeLFOSpecifier(LFOSpecRec* LFOSpec);
  59.  
  60. /* get the frequency envelope record */
  61. struct EnvelopeRec*        GetLFOSpecFrequencyEnvelope(LFOSpecRec* LFOSpec);
  62.  
  63. /* get the amplitude envelope record */
  64. struct EnvelopeRec*        GetLFOSpecAmplitudeEnvelope(LFOSpecRec* LFOSpec);
  65.  
  66. /* get the oscillator type for this LFO specifier */
  67. LFOOscTypes                        LFOSpecGetOscillatorType(LFOSpecRec* LFOSpec);
  68.  
  69. /* change the oscillator type */
  70. void                                    SetLFOSpecOscillatorType(LFOSpecRec* LFOSpec, LFOOscTypes NewType);
  71.  
  72. /* get the oscillator modulation mode */
  73. LFOModulationTypes        LFOSpecGetModulationMode(LFOSpecRec* LFOSpec);
  74.  
  75. /* change the oscillator modulation mode */
  76. void                                    SetLFOSpecModulationMode(LFOSpecRec* LFOSpec,
  77.                                                 LFOModulationTypes NewType);
  78.  
  79. /* find out what the adding mode of the LFO is */
  80. LFOAdderMode                    LFOSpecGetAddingMode(LFOSpecRec* LFOSpec);
  81.  
  82. /* set a new adding mode for the LFO */
  83. void                                    SetLFOSpecAddingMode(LFOSpecRec* LFOSpec,
  84.                                                 LFOAdderMode NewAddingMode);
  85.  
  86. /* for wave table lfo oscillators only */
  87. struct EnvelopeRec*        GetLFOSpecWaveTableIndexEnvelope(LFOSpecRec* LFOSpec);
  88.  
  89. /* get the sample selector list */
  90. struct SampleSelectorRec*    GetLFOSpecSampleSelector(LFOSpecRec* LFOSpec);
  91.  
  92. #endif
  93.